package cn.stylefeng.guns.modular.manager.model.result;

import lombok.Data;

import java.util.List;

@Data
public class ArchiveInfoReport {
    private String title;
    private String xh;
    private String ssbmid;
    private String dalx;
    private int dac = 0;
    private int zlc = 0;
    private int a5 = 0;
    private int a10 = 0;
    private int a15 = 0;
    private int a20 = 0;
    private int a25 = 0;
    private int a30 = 0;
    private int a35 = 0;
    private int a99 = 0;
    private int b5 = 0;
    private int b10 = 0;
    private int b15 = 0;
    private int b20 = 0;
    private int b25 = 0;
    private int b30 = 0;
    private int b35 = 0;
    private int b99 = 0;
    private int c5 = 0;
    private int c10 = 0;
    private int c15 = 0;
    private int c20 = 0;
    private int c25 = 0;
    private int c30 = 0;
    private int c35 = 0;
    private int c99 = 0;

    public static ArchiveInfoReport addOther(List<ArchiveInfoReport> others) {
        ArchiveInfoReport one = new ArchiveInfoReport();
        for (ArchiveInfoReport other : others) {
            one.setDac(one.getDac() + other.getDac());
            one.setZlc(one.getZlc() + other.getZlc());
            one.setA5(one.getA5() + other.getA5());
            one.setA10(one.getA10() + other.getA10());
            one.setA15(one.getA15() + other.getA15());
            one.setA20(one.getA20() + other.getA20());
            one.setA25(one.getA25() + other.getA25());
            one.setA30(one.getA30() + other.getA30());
            one.setA35(one.getA35() + other.getA35());
            one.setA99(one.getA99() + other.getA99());


            one.setB5(one.getB5() + other.getB5());
            one.setB10(one.getB10() + other.getB10());
            one.setB15(one.getB15() + other.getB15());
            one.setB20(one.getB20() + other.getB20());
            one.setB25(one.getB25() + other.getB25());
            one.setB30(one.getB30() + other.getB30());
            one.setB35(one.getB35() + other.getB35());
            one.setB99(one.getB99() + other.getB99());


            one.setC5(one.getC5() + other.getC5());
            one.setC10(one.getC10() + other.getC10());
            one.setC15(one.getC15() + other.getC15());
            one.setC20(one.getC20() + other.getC20());
            one.setC25(one.getC25() + other.getC25());
            one.setC30(one.getC30() + other.getC30());
            one.setC35(one.getC35() + other.getC35());
            one.setC99(one.getC99() + other.getC99());
        }
        return one;
    }
}
